<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 基础样式 -->
    <link rel="stylesheet" href="/css/base.css">
    <!-- 插件 -->
    <link rel="stylesheet" href="/lib/layui-v2.7.5/css/layui.css">
    <link rel="stylesheet" href="/lib/cropper/cropper.min.css">
    <!-- 字体图标样式 -->
    <link rel="stylesheet" href="/iconfont/iconfont.css">
    <!-- 自己的css -->
    <link rel="stylesheet" href="/pages/article/publish/publish.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">发布文章</div>
        <div class="layui-card-body">
            <form class="layui-form" action="" id="submit">
                <div class="layui-form-item">
                    <label class="layui-form-label">文章标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" id="title">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">文章类别</label>
                    <div class="layui-input-block">
                        <select name="city" lay-verify="required" id="select-cate">
                        </select>
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文章内容</label>
                    <div class="layui-input-block">
                        <textarea name="desc" placeholder="请输入内容" class="layui-textarea" id="article_content"></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文章封面</label>
                    <div class="layui-input-block">
                        <!-- 封面图片大盒子 -->
                        <div class="front-cover">
                            <!-- 左边大图片 -->
                            <div class="left">
                                <img src="/images/sample.jpg" alt="" id="big_img">
                            </div>
                            <!-- 预览图片 -->
                            <div class="right">
                                <div class="top" id="preview_img_box"></div>
                                <!-- 按钮 -->
                                <button class="layui-btn" lay-submit lay-filter="formDemo" id="select-img">选择图片</button>
                                <input type="file" id="input_file" style="display: none;">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo" id="publish">发布</button>
                        <button type="reset" class="layui-btn layui-btn-primary" id="draft">存为草稿</button>
                    </div>
                </div>
            </form>
        </div>
    </div>



    <!-- 引入jQuer -->
    <script src="/lib/jquery-3.6.0.min.js"></script>
    <!-- 插件layui -->
    <script src="/lib/layui-v2.7.5/layui.js"></script>
    <!-- 引入裁剪图片插件 -->
    <script src="/lib/cropper/cropper.min.js"></script>
    <!-- 引入富文本框插件 -->
    <script src="/lib/tinymce/tinymce.min.js"></script>
    <!-- ajax -->
    <script src="/lib/axios.min.js"></script>
    <!-- 公共js -->
    <script src="/js/apiBase.js"></script>
    <!-- 自己的js -->
    <script src="/pages/article/publish/publish.js"></script>
</body>

</html>